import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/pages/index'
import Login from '@/pages/login'
import VoucherVerify from '@/pages/voucher-verify'
import ModifyPwd from '@/pages/modify-pwd'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/index'
    },
    {
      path: '/index',
      name: 'index',
      component: Index,
      meta: {
        title: '优惠券核销',
        auth: true
      }
    },
    {
      path: '/login',
      name: 'login',
      component: Login,
      meta: {
        title: '登录'
      }
    },
    {
      path: '/voucher-verify',
      name: 'voucher-verify',
      component: VoucherVerify,
      meta: {
        title: '优惠券核销',
        auth: true
      }
    },
    {
      path: '/modify-pwd',
      name: 'modify-pwd',
      component: ModifyPwd,
      meta: {
        title: '修改密码',
        auth: true
      }
    }
  ]
})
